package com.hyx.bookManager.controller;

import com.hyx.bookManager.domain.common.CommonResult;
import com.hyx.bookManager.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @ClassName AdminUserController
 * @Description TODO
 * @Author 黄乙轩
 * @Date 2021/6/7 22:19
 * @Version 1.0
 **/
@CrossOrigin
@RestController
@RequestMapping("adminUser")
public class AdminUserController {

    @Autowired
    private UserService userService;

    @ResponseBody
    @GetMapping("getAllUser")
    public CommonResult getAllUser(){
        return userService.getAllUser();
    }

    @ResponseBody
    @RequestMapping("/getCurrentUser")
    public CommonResult getCurrentUser(){
        return userService.getCurrentUser();
    }
}
